# -*- coding: utf-8 -*-
# @Time    : 2021/4/13 19:51
# @Author  : mokez
# @Email   : 1569089678@qq.com
# @File    : mac.py
# @Software: PyCharm

# 生成100个MAC地址并写入文件中，MAC地址前6位（16
# 进制）为01 - AF - 3B
import random
with open("mac.txt",mode="w",encoding="utf-8") as fp:
    for i in range(100):
        ip = f"01-AF-3B-{hex(random.randint(0,16))[-1].upper()}{hex(random.randint(0,16))[-1].upper()}-{hex(random.randint(0,16))[-1].upper()}{hex(random.randint(0,16))[-1].upper()}-{hex(random.randint(0,16))[-1].upper()}{hex(random.randint(0,16))[-1].upper()}\n"
        fp.write(ip)